package cn.hansfly.test;

import java.io.BufferedOutputStream;
import java.io.BufferedWriter;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;

public class FileIOTeset {
	public static void main(String[] args) {
		File f = new File("log.0");
//		int a = (int) ' ';
//		System.out.println(a);
		try {
			BufferedWriter bw = new BufferedWriter(new FileWriter(f, true));
			bw.write("fffffff");
			bw.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
//		try {
//			DataOutputStream dos = new DataOutputStream(new FileOutputStream(f));
//			dos.write("abcd".getBytes());
//			Integer t = Integer.valueOf(100);
//			dos.write(t.byteValue());
//			dos.close();
//		} catch (FileNotFoundException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (IOException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
	}
}
